<template>
  <div class="systemset-other-earlywarning-container">
    <el-form
      :model="form"
      label-width="auto"
      style="max-width: 600px; margin: auto; margin-top: 20px; padding: 20px"
    >
      <el-form-item label="客户商机跟进预警">
        <el-space wrap>
          <el-switch v-model="form.delivery" />
          <el-input v-model="form.name" style="width: 100px" />
          天
        </el-space>
      </el-form-item>
      <el-form-item label="客户商机跟进预警">
        <el-space wrap>
          <el-switch v-model="form.delivery" />
          <el-input v-model="form.name" style="width: 100px" />
          天
        </el-space>
      </el-form-item>
      <el-form-item label="客户商机跟进预警">
        <el-space wrap>
          <el-switch v-model="form.delivery" />
          <el-input v-model="form.name" style="width: 100px" />
          天
        </el-space>
      </el-form-item>
      <el-form-item label="客户商机跟进预警">
        <el-space wrap>
          <el-switch v-model="form.delivery" />
          <el-input v-model="form.name" style="width: 100px" />
          天
        </el-space>
      </el-form-item>
      <el-form-item label="客户商机跟进预警">
        <el-space wrap>
          <el-switch v-model="form.delivery" />
          <el-input v-model="form.name" style="width: 100px" />
          天
        </el-space>
      </el-form-item>
      <el-form-item label="客户商机跟进预警">
        <el-space wrap>
          <el-switch v-model="form.delivery" />
          <el-input v-model="form.name" style="width: 100px" />
          天
        </el-space>
      </el-form-item>
      <el-form-item>
        <el-button type="primary" @click="onSubmit">保存设置</el-button>
      </el-form-item>
    </el-form>
  </div>
</template>

<script>
  import { defineComponent, reactive, toRefs } from 'vue'

  export default defineComponent({
    name: 'SystemsetOtherEarlywarning',
    setup() {
      const state = reactive({
        form: {
          name: '',
          region: '',
          date1: '',
          date2: '',
          delivery: false,
          type: [],
          resource: '',
          desc: '',
        },
      })

      const onSubmit = () => {
        console.log('submit!')
      }

      return {
        ...toRefs(state),
        onSubmit,
      }
    },
  })
</script>

<style>
  .systemset-other-earlywarning-container {
    padding: 30px;
  }
</style>
